package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MineTrainingMapper;
import com.ruoyi.system.domain.MineTraining;
import com.ruoyi.system.service.IMineTrainingService;

/**
 * 培训Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-14
 */
@Service
public class MineTrainingServiceImpl implements IMineTrainingService 
{
    @Autowired
    private MineTrainingMapper mineTrainingMapper;

    /**
     * 查询培训
     * 
     * @param trainingId 培训主键
     * @return 培训
     */
    @Override
    public MineTraining selectMineTrainingByTrainingId(Long trainingId)
    {
        return mineTrainingMapper.selectMineTrainingByTrainingId(trainingId);
    }


    /**
     * 查询培训
     *
     * @param examId 培训主键
     * @return 培训
     */
    @Override
    public MineTraining selectMineTrainingByExamId(Long examId) {
        // 实现根据 examId 查询培训信息的逻辑
        return mineTrainingMapper.selectMineTrainingByExamId(examId);
    }


    /**
     * 查询培训列表
     * 
     * @param mineTraining 培训
     * @return 培训
     */
    @Override
    public List<MineTraining> selectMineTrainingList(MineTraining mineTraining)
    {
        return mineTrainingMapper.selectMineTrainingList(mineTraining);
    }

    /**
     * 新增培训
     * 
     * @param mineTraining 培训
     * @return 结果
     */
    @Override
    public int insertMineTraining(MineTraining mineTraining)
    {
        return mineTrainingMapper.insertMineTraining(mineTraining);
    }

    /**
     * 修改培训
     * 
     * @param mineTraining 培训
     * @return 结果
     */
    @Override
    public int updateMineTraining(MineTraining mineTraining)
    {
        return mineTrainingMapper.updateMineTraining(mineTraining);
    }

    /**
     * 批量删除培训
     * 
     * @param trainingIds 需要删除的培训主键
     * @return 结果
     */
    @Override
    public int deleteMineTrainingByTrainingIds(Long[] trainingIds)
    {
        return mineTrainingMapper.deleteMineTrainingByTrainingIds(trainingIds);
    }

    /**
     * 删除培训信息
     * 
     * @param trainingId 培训主键
     * @return 结果
     */
    @Override
    public int deleteMineTrainingByTrainingId(Long trainingId)
    {
        return mineTrainingMapper.deleteMineTrainingByTrainingId(trainingId);
    }
}
